import request from '@/utils/request'

export function getPermissionList(query) {
  return request({
    url: '/permission/list',
    method: 'get',
    params: query
  })
}

export function getInfo(id) {
  return request({
    url: '/permission/info',
    method: 'get',
    params: { id }
  })
}

export function createPermission(data) {
  return request({
    url: '/permission/add',
    method: 'post',
    data
  })
}
export function updatePermission(data) {
  return request({
    url: '/permission/save',
    method: 'post',
    data
  })
}

export function delPermission(id) {
  return request({
    url: '/permission/del',
    method: 'delete',
    params: { id }
  })
}
